﻿<Window x:Name="mainWindow" x:Class="WPFCSharpWebCam.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="WPF C# WebCam" Height="400" Width="600" Loaded="mainWindow_Loaded">
    <!-- Design by Pongsakorn Poosankam -->
	<Window.Background>
		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
			<GradientStop Color="#FFD7F4E8" Offset="0.916"/>
			<GradientStop Color="#FF6CB595" Offset="0.145"/>
		</LinearGradientBrush>
	</Window.Background>
    <Grid>
    	<Grid.RowDefinitions>
    		<RowDefinition Height="0.11*"/>
    		<RowDefinition Height="0.442*"/>
    		<RowDefinition Height="0.067*"/>
    		<RowDefinition Height="0.088*"/>
    		<RowDefinition Height="0.293*"/>
    	</Grid.RowDefinitions>
    	<Grid.ColumnDefinitions>
    		<ColumnDefinition Width="0.068*"/>
    		<ColumnDefinition Width="0.274*"/>
    		<ColumnDefinition Width="0.069*"/>
    		<ColumnDefinition Width="0.274*"/>
    		<ColumnDefinition Width="0.315*"/>
    	</Grid.ColumnDefinitions>
		<Border  Grid.Column="1" Grid.Row="1" BorderThickness="3" CornerRadius="3">
			<Border.BorderBrush>
				<RadialGradientBrush>
					<GradientStop Color="Black" Offset="0.047"/>
					<GradientStop Color="#FF00907A" Offset="1"/>
				</RadialGradientBrush>
			</Border.BorderBrush>
			<Image x:Name="imgVideo" Stretch="Fill"   />
		</Border>
    	<Border  Grid.Column="3" Grid.Row="1" BorderThickness="3" CornerRadius="3">
			<Border.BorderBrush>
				<RadialGradientBrush>
					<GradientStop Color="Black" Offset="0.047"/>
					<GradientStop Color="#FF00907A" Offset="1"/>
				</RadialGradientBrush>
			</Border.BorderBrush>
			<Image x:Name="imgCapture" Stretch="Fill"/>
		</Border>
		<StackPanel Grid.Column="3" Grid.Row="3" Orientation="Horizontal">
			<Button x:Name="bntCapture" Content="Capture Image" Click="bntCapture_Click" />
			<Button x:Name="bntSaveImage" Content="Save Image" Margin="8,0,0,0" Click="bntSaveImage_Click" />
		</StackPanel>
		<StackPanel Grid.Column="4" Grid.Row="1" VerticalAlignment="Center">
			<Button x:Name="bntResolution" Content="Video Format" Width="120" Click="bntResolution_Click" />
    		<Button x:Name="bntSetting" Content="Video Source" Width="120" Margin="0,10,0,0" Click="bntSetting_Click" />
		</StackPanel>
		<StackPanel Grid.Column="1" Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center">
            <Button x:Name="bntStart" Content="Start" Click="bntStart_Click" />
			<Button x:Name="bntStop" Content="Stop" Margin="10,0,0,0" Click="bntStop_Click" />
			<Button x:Name="bntContinue" Content="Continue" Margin="10,0,0,0" Click="bntContinue_Click" />
		</StackPanel>
    </Grid>
</Window>
